﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="wucBusca.ascx.cs" Inherits="Manicure.Includes.wucBusca" %>


<script type="text/javascript">

    function fctVerificarCampo() {
        if (document.getElementById("ctl00_wucBusca_txtBusca")) {
            if (document.getElementById("ctl00_wucBusca_txtBusca").value.toString().trim() == "") {
                document.getElementById("ctl00_wucBusca_txtBusca").value = "";
                document.getElementById("ctl00_wucBusca_txtBusca").focus();
                alert("Campo de busca não pode estar vazio.");
                return false;
            }

            return true;
        }
    }

    function fctVerificarEnter(e, blnTopo) {
        var tecla;

        if (e.keyCode)
            tecla = e.keyCode;  // IE   

        else if (e.which)
            tecla = e.which; // Firefox  

        if (tecla == 13) {
            if (blnTopo == true)
                document.getElementById('ctl00_wucBusca_imbConsultar').click();
            else
                document.getElementById('ctl00_wucBuscaRodape_imbConsultar').click();
        }
    }

</script>


<asp:Panel runat="server" ID="pnlBusca">
    <table style="width: 100%; height: 50px; border-collapse: collapse; border-spacing: 0px;" border="0">
        <tr>
            <td style="width: 100%">
                <asp:Panel runat="server" ID="pnlPainelBusca">
                    <table style="width: 100%; border-collapse: collapse; border-spacing: 0px;" border="0">
                        <tr>
                            <td style="width: 100px">
                                <img src="../Imagens/Logo_Busca.jpg" />
                            </td>
                            <td style="width: 5px">&nbsp</td>
                            <td style="width: 60px;" class="txtBusca">Busca</td>
                            <td style="width: 5px">&nbsp;</td>
                            <td>
                                <asp:TextBox runat="server" CssClass="txtBoxBusca" ID="txtBusca" Style="width: 100%;" CausesValidation="true" onkeypress="return fctVerificarEnter(event,true);"></asp:TextBox>
                            </td>
                            <td style="width: 30px" class="txtBusca">em
                            </td>
                            <td style="width: 5px">&nbsp;</td>
                            <td style="width: 150px">
                                <asp:DropDownList ID="ddlCategoria" runat="server" CssClass="txtBoxBusca" Width="100%"></asp:DropDownList>
                            </td>
                            <td style="width: 5px; text-align: center;">&nbsp;</td>
                            <td style="width: 84px; text-align: center;">
                                <div onclick="return fctVerificarCampo();">
                                    <asp:ImageButton runat="server" ID="imbConsultar" ImageUrl="~/Imagens/imbConsultar.jpg" SkinID="imbConsultar" Width="78px" Height="32px" CausesValidation="false" OnClick="imbConsultar_Click" />
                                </div>
                            </td>
                        </tr>
                    </table>
                </asp:Panel>
            </td>
            <td style="width: 5px">&nbsp;</td>
            <td style="width: 152px; text-align: center;">
                <a href="Agenda.aspx">imgAgenda
                </a>
            </td>
            <td style="width: 5px">&nbsp;</td>
            <td style="width: 152px; text-align: center;">
                <a href="Agendamento.aspx">imgAgendamento
                </a>
            </td>
        </tr>
    </table>
</asp:Panel>
